package com.tjec.project.system.service.impl;

import java.util.List;
import com.tjec.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tjec.project.system.mapper.BmsMdWorkflowConfigMapper;
import com.tjec.project.system.domain.BmsMdWorkflowConfig;
import com.tjec.project.system.service.IBmsMdWorkflowConfigService;

/**
 * 流程配置Service业务层处理
 * 
 * @author liuxu
 * @date 2020-05-11
 */
@Service
public class BmsMdWorkflowConfigServiceImpl implements IBmsMdWorkflowConfigService 
{
    @Autowired
    private BmsMdWorkflowConfigMapper bmsMdWorkflowConfigMapper;

    /**
     * 查询流程配置
     * 
     * @param guid 流程配置ID
     * @return 流程配置
     */
    @Override
    public BmsMdWorkflowConfig selectBmsMdWorkflowConfigByGuid(String guid)
    {
        return bmsMdWorkflowConfigMapper.selectBmsMdWorkflowConfigByGuid(guid);
    }

    /**
     * 查询流程配置列表
     * 
     * @param bmsMdWorkflowConfig 流程配置
     * @return 流程配置
     */
    @Override
    public List<BmsMdWorkflowConfig> selectBmsMdWorkflowConfigList(BmsMdWorkflowConfig bmsMdWorkflowConfig)
    {
        return bmsMdWorkflowConfigMapper.selectBmsMdWorkflowConfigList(bmsMdWorkflowConfig);
    }

    /**
     * 新增流程配置
     * 
     * @param bmsMdWorkflowConfig 流程配置
     * @return 结果
     */
    @Override
    public int insertBmsMdWorkflowConfig(BmsMdWorkflowConfig bmsMdWorkflowConfig)
    {
        bmsMdWorkflowConfig.setCreateTime(DateUtils.getNowDate());
        return bmsMdWorkflowConfigMapper.insertBmsMdWorkflowConfig(bmsMdWorkflowConfig);
    }

    /**
     * 修改流程配置
     * 
     * @param bmsMdWorkflowConfig 流程配置
     * @return 结果
     */
    @Override
    public int updateBmsMdWorkflowConfig(BmsMdWorkflowConfig bmsMdWorkflowConfig)
    {
        bmsMdWorkflowConfig.setUpdateTime(DateUtils.getNowDate());
        return bmsMdWorkflowConfigMapper.updateBmsMdWorkflowConfig(bmsMdWorkflowConfig);
    }

    /**
     * 批量删除流程配置
     * 
     * @param guids 需要删除的流程配置ID
     * @return 结果
     */
    @Override
    public int deleteBmsMdWorkflowConfigByGuids(String[] guids)
    {
        return bmsMdWorkflowConfigMapper.deleteBmsMdWorkflowConfigByGuids(guids);
    }

    /**
     * 删除流程配置信息
     * 
     * @param guid 流程配置ID
     * @return 结果
     */
    @Override
    public int deleteBmsMdWorkflowConfigByGuid(String guid)
    {
        return bmsMdWorkflowConfigMapper.deleteBmsMdWorkflowConfigByGuid(guid);
    }
}
